Mobile electronic devices such as personal digital assistants (PDAs) and digital cellular telephones are increasingly including applications written in the JAVA programming language. JAVA is a registered trademark of SUN Microsystems in Santa Clara, Calif. Many of these mobile devices include operating systems written in programming languages other than JAVA. To increase system stability, it would be desirable to implement all or part of the operating system using the JAVA programming language. However, manipulating low-level system data structures such as page tables, registers, interrupts, and task structures is difficult in JAVA. Such low-level structures typically are bit-based structures or complex structures with field sizes that cannot be represented directly in JAVA structures. For example, there is no way to create in JAVA a field of five bits that corresponds physically to only five bits in memory. Enhancements to improve the ability to manipulate low-level system data structures in JAVA applications are desirable.